package com.starlink.model.util;

import com.starlink.model.dtomapper.MallBooksShippingDtoMapper;
import com.starlink.model.domain.MallBooksShippingDO;
import com.starlink.model.vo.MallBooksShippingVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class MallBooksShippingConvert {

    public static List<MallBooksShippingVO> buildMallBooksShippingVoList(List<MallBooksShippingDO> mallBooksShippingDOList) {
        if (CollectionUtils.isEmpty(mallBooksShippingDOList)) {
            return Lists.newArrayList();
        }
        List<MallBooksShippingVO> mallBooksShippingVOList = new ArrayList<>();
        for (MallBooksShippingDO mallBooksShippingDO : mallBooksShippingDOList) {
            mallBooksShippingVOList.add(MallBooksShippingDtoMapper.INSTANCE.do2VO(mallBooksShippingDO));
        }

        return mallBooksShippingVOList;
    }
}
